<?php

require('fpdf.php');

class PDF extends FPDF {

    //var $company_name = "Company Name";
    //var $title = "Report Title";

    function Header() {
        // Select Arial bold 15
        $this->SetFont('Arial', 'B', 10);
        $this->SetTextColor(23, 57, 118);
        $this->Cell(10, 5, utf8_decode($this->title));
        $this->SetDrawColor(141, 179, 226);
        $this->SetLineWidth(2);
        $this->Line(11, 16, 201, 16);

        // Line break
        $this->Ln(10);
    }

    function Footer() {
        $this->SetY(-15);
        $this->SetFont('Arial', 'I', 8);
        $this->Cell(0, 10, utf8_decode('Página ') . $this->PageNo(), 0, 0, 'C');
    }

    function setHeaderCol($x, $y, $title) {
        $this->SetFont('Arial', 'B', 8);
        $this->SetFillColor(220, 220, 220);
        $this->SetDrawColor(255, 255, 255);
        $this->Cell($x, $y, utf8_decode($title), 1, 0, 'C', true);
    }

    function setDetailCol($x, $y, $title, $al = 'L') {
        $this->SetFont('Arial', '', 7);
        $this->Cell($x, $y, utf8_decode($title), 0, 0, $al, false);
    }

}

?>
